#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

const int N = 1e5+10;
const int mod = 1004535809;

ll read(){
	ll x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48),x %= mod;
	return x*sgn;
}

ll Wn[N<<2],A[N<<2],B[N<<2];
int n,len,rev[N<<2],tp,k;

ll qp(ll x,int t){ll res=1;for(;t;t>>=1,x=x*x%mod)if(t&1)res=res*x%mod;return res;}

void NTT(ll *f,int on = 1){
	for(int i = 1;i < len;i++) if(i < rev[i]) swap(f[i],f[rev[i]]);
	for(int h = 2;h <= len;h <<= 1){
		ll wn = Wn[h];
		for(int i = 0;i < len;i += h){
			ll ww = 1;
			for(int k = i;k < i + h / 2;k++){
				ll u = f[k],v = f[k+h/2] * ww % mod;ww = ww * wn % mod;
				f[k] = (u + v) % mod,f[k+h/2] = (u - v + mod) % mod;
			}
		}
	}if(on == -1){reverse(f+1,f+len);ll invv = qp(len,mod-2); for(int i = 0;i < len;i++) f[i] = f[i] * invv % mod;}
}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in; k = in,tp = in; for(int i = 0;i < n;i++) A[i] = in;
	B[0] = 1; if(tp == 0) for(int i = 1;i <= n;i++) B[i] = B[i-1] * (k + i - 1) % mod * qp(i,mod-2) % mod;
	else for(int i = 1;i <= n;i++) B[i] = (-B[i-1] * (k - i + 1) % mod * qp(i,mod-2) % mod + mod) % mod;
	for(len = 1;len < n << 1;len <<= 1); for(int i = 1;i < len;i++) rev[i] = rev[i>>1]>>1 | (i & 1 ? len >> 1 : 0);
	for(int h = 1;h <= len;h<<=1) Wn[h] = qp(3,(mod-1)/h);
	NTT(A); NTT(B); for(int i = 0;i < len;i++) A[i] = A[i] * B[i] % mod;
	NTT(A,-1); for(int i = 0;i < n;i++) printf("%lld%c",A[i] % mod," \n"[i == n-1]);
	return 0;
}

